<script setup lang="ts">
/*
按需加载 vant
1:下载插件  yarn add unplugin-vue-components -D
2：配制插件  vite.config.ts
   import Components from 'unplugin-vue-components/vite'
import { VantResolver } from 'unplugin-vue-components/resolvers'
  plugins: [
    ....
    Components({
      // 不需要给组件生成类型申明文件
      dts: false,
      // 按需要加载了组件与组件的样式
      resolvers: [VantResolver({ importStyle: false })]
    })
  ]
3:在main.ts导入所有的vant的样式
  import 'vant/lib/index.css'
  

*/

import { showToast } from 'vant'

const btnClick = () => {
  showToast('我是消息提示')
}
</script>

<template>
  <div class="app-page">
    <van-button @click="btnClick">测试按钮</van-button>
    <van-cell-group>
      <van-cell title="单元格" value="内容" />
      <van-cell title="单元格" value="内容" label="描述信息" />
    </van-cell-group>
  </div>
</template>

<style lang="scss" scoped></style>
